package com.zhongke.cotrun.service;


import com.github.pagehelper.PageInfo;
import com.zhongke.cotrun.model.pojo.IntegralRecord;
import com.zhongke.cotrun.model.pojo.IntegralRecordVo;
import com.zhongke.cotrun.shiro.web.entity.WebUserEntity;

import java.util.List;

public interface IntegralRecordService {
    /**
     * 新增积分规则
     *
     * @param integralRecord
     * @return
     */
    public Boolean insertIntegralRecord(IntegralRecord integralRecord);

    /**
     * 根据id查看
     *
     * @param id
     * @return
     */
    public IntegralRecordVo selectIntegralRecordByid(Integer id);

    /**
     * 修改积分规则
     *
     * @param integralRecord
     * @return
     */
    public Boolean updateIntegralRecord(IntegralRecord integralRecord);


    /**
     * 根据条件搜索积分规则分页
     *
     * @param integralRecord
     * @param pageNumber
     * @param pageSize
     * @return
     */
    public PageInfo selectIntegralRecordByCondition(IntegralRecord integralRecord, Integer pageNumber, Integer pageSize);

    /**
     * 根据账户类型查询积分规则
     *
     * @param integralNameId
     * @return
     */
    public IntegralRecordVo selectIntegralRecordByIntegralType(Integer integralNameId);

    /**
     * 新建修改积分规则
     *
     * @param integralRecord
     * @return
     */
    public Boolean insertUpdateIntegralRecord(IntegralRecord integralRecord);

    /**
     * 查看自己的权益
     *
     * @param integralRecordVo
     * @return
     */
    public List<IntegralRecordVo> selectRights(IntegralRecordVo integralRecordVo);


    /**
     * 查看自己的权益取出最大的
     * @param integralRecordVo
     * @param memberGrade
     * @param w
     * @return
     */

    public List<IntegralRecordVo> selectOfMyBig(IntegralRecordVo integralRecordVo, String memberGrade , WebUserEntity w);
}
